import { defineStore } from 'pinia'
import { isMobile } from '@/utils/other'

/**
 * 全局数据
 */
export const useAppState = defineStore('appState', {
  state: (): AppState => ({
    mobile: isMobile()
  }),
  actions: {
    async onIsMobile() {
      this.mobile = isMobile()
    }
  }
})
